Optimal. Leaf size=20 \[ a^2 x+2 a b \log (x)-\frac{b^2}{x} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0293332, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222 \[ a^2 x+2 a b \log (x)-\frac{b^2}{x} \]
Antiderivative was successfully verified.
[In] Int[(a + b/x)^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F] time = 0., size = 0, normalized size = 0. \[ 2 a b \log{\left (x \right )} - \frac{b^{2}}{x} + \int a^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((a+b/x)**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.00563458, size = 20, normalized size = 1. \[ a^2 x+2 a b \log (x)-\frac{b^2}{x} \]
Antiderivative was successfully verified.
[In] Integrate[(a + b/x)^2,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.008, size = 21, normalized size = 1.1 \[ -{\frac{{b}^{2}}{x}}+x{a}^{2}+2\,ab\ln \left ( x \right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((a+b/x)^2,x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.44004, size = 27, normalized size = 1.35 \[ a^{2} x + 2 \, a b \log \left (x\right ) - \frac{b^{2}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a + b/x)^2,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.225049, size = 32, normalized size = 1.6 \[ \frac{a^{2} x^{2} + 2 \, a b x \log \left (x\right ) - b^{2}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a + b/x)^2,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 1.08675, size = 17, normalized size = 0.85 \[ a^{2} x + 2 a b \log{\left (x \right )} - \frac{b^{2}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a+b/x)**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.222449, size = 28, normalized size = 1.4 \[ a^{2} x + 2 \, a b{\rm ln}\left ({\left | x \right |}\right ) - \frac{b^{2}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a + b/x)^2,x, algorithm="giac")
[Out]